package com.jkgh.tnh.rs.system {

	import com.jkgh.remedium.RemediumSystem;
	import com.jkgh.remedium.objects.messages.RemediumInMessage;
	import com.jkgh.remedium.states.OrderAwaitingState;
	import com.jkgh.remedium.test.Main;
	import com.jkgh.tnh.rs.TNHAccess;

	import flash.net.Socket;

	public class TNHRemediumSystem extends RemediumSystem {

		public function TNHRemediumSystem(serverIP:String, onMainObjectReceived:Function) {
			super(serverIP, TNHAccess.createConsumingState(new RemediumInMessage(), function(result:TNHAccess):void {
				setState(new OrderAwaitingState());
				onMainObjectReceived(result);
			}));
		}
	}
}
